﻿using System;
using System.Linq;
using Furesoft.Patterns.Visitor;

namespace VisitorExample
{
    public class FruitPriceVisitor : IVisitor
    {
        public double Sum { get; set; }

        public void Visit(Visitable visitable)
        {
            Sum += ((Fruit)visitable).Price;
        }
    }
}
